package com.swz.dcrm.ui.car;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

import com.swz.dcrm.R;
import com.swz.dcrm.model.Car;
import com.swz.dcrm.model.CarModel;
import com.zhouwei.mzbanner.holder.MZViewHolder;

public class CarModelHolder implements MZViewHolder<CarModel> {

    private TextView tvCarModel;
    private TextView tvPrice;
    @Override
    public View createView(Context context) {
        View  view = LayoutInflater.from(context).inflate(R.layout.item_car_compare,null);
        tvCarModel= view.findViewById(R.id.tv_car_model);
        tvPrice=view.findViewById(R.id.tv_price);
        return view;
    }

    @Override
    public void onBind(Context context, int i, CarModel car) {
        tvCarModel.setText(car.getDesc());
        tvPrice.setText(car.getCarPrice()+"");
    }
}
